﻿using System;
using BasecampRestAPI;
using NUnit.Framework;

namespace TestBasecampRestAPI
{
	[TestFixture]
	public class TestMilestone
	{
		[Test]
		public void Construct()
		{
			IMilestone milestone = Milestone.GetInstance(null,
				TestBasecamp.GetElementForXml(Properties.Resources.FakeMilestone));
			Assert.AreEqual(10808780, milestone.Id);
			Assert.AreEqual(false, milestone.Completed);
			Assert.AreEqual(DateTime.Parse("2009-07-29T06:28:03Z"), milestone.CreatedOn);
			Assert.AreEqual(DateTime.Parse("2009-08-31"), milestone.Deadline);
			Assert.AreEqual("Milestone 1", milestone.Title);
			Assert.AreEqual(true, milestone.WantsNotification);
		}
	}
}
